<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>

</head>
<body>
   我就是一个首页
   <button>点击</button>
   <script type="text/javascript">
       $(document).ready(function () {
           var max = 30000;
           // for(var i = 1; i < max; i++){
           //     $.get({
           //         url: "localhost:8888/userRedPaper/addRedPaper?redId=1&userId=2",
           //         async: true,
           //         success: function (result) {
           //             alert(result.getData())
           //         }
           //     });
           // }
           $("button").click(function(){
               for(var i = 1; i < max; i++){
                   $.ajax({url:"/userRedPaper/addRedPaper?redId=4&userId="+i,async:true,success:function(result){

                       }});
               }
           });
       })
   </script>
</body>
</html>